clc;
x=0:0.001:1.2;
y1=x;
y2=x.^2;
plot(x,y1,x,y2),hold on;
ii=find(x<=1);
xx=[x(ii),x(ii(end):-1:1)];
yy=[y2(ii),y1(ii(end):-1:1)];
fill(xx,yy,'g')
disp('------------------------------------')
syms x;
y=x;
f=(x^2+y^2);
I1=path_integral(f,[x,y],x,1,0)
y=x^2;
f=(x^2+y^2);
I2=path_integral(f,[x,y],x,0,1),
I=I1+I2;
pretty(I)